#ifndef _YGCONTEXT_H_
#define _YGCONTEXT_H_

#include "YGDict.h"

#include <map>
#include <vector>

namespace YoghurtGum
{

	class Event;
	class EventListener;
	class Window;
	class RenderMethod;

	class Context
	{
	
	public:

		static Context& Get();
	
		void SetEventListener(const char* a_Event, EventListener* a_Listener);

		void PushEvent(const char* a_Name, const Dict& a_Arguments);

		void HandleEvents();

	protected:

		Context();
		~Context();

		static Context* s_Instance;

		Window* m_Window;
		RenderMethod* m_Renderer;

		std::vector<Event*> m_Events;
		std::vector<EventListener*> m_EventListeners;

		EventListener* m_ListenerOnCreate;
		EventListener* m_ListenerOnDestroy;
		EventListener* m_ListenerOnResize;
		EventListener* m_ListenerOnUpdate;
	
	}; // class Context

}; // namespace YoghurtGum
	
#endif